Encrypting Xbasic function libraries, Modules, and Classes

Description

If an Xbasic Module, Class, or Function Library contains scripts that need to be encrypted, you can use the 'ENCRYPT and 'PASSWORD comments to encrypt the file and optionally add password protection.

Discussion

In order to encrypt an Xbasic Function Library, Module, or Class file in the Web Projects workspace, the first line of the file must be an Xbasic comment (with no leading spaces):

'ENCRYPT

In order to both encrypt and password protect a file the first line of the file must be an Xbasic comment (with no leading spaces) of this form:

'PASSWORD:your_password

For example:

'PASSWORD:mysecretpassword

At run-time encrypted files are automatically decrypted.

If a file is password protected, then when you try to edit the file from the Web Control Panel, you will be prompted to enter the password. Once you have successfully supplied the file password you will no longer be challenged for the password when you next edit the file (until you exit from the Alpha Anywhere IDE).